package com.kancy.vip.pattern.proxy.dynamicproxy;

import com.kancy.vip.pattern.proxy.Person;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author kancy
 * @date 2019/3/16 15:39
 */
public class Meipo implements InvocationHandler {

	private Person target;

	public Meipo(Person target) {
		this.target = target;
	}


	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {

		System.out.println(method +""+ method.getDeclaredAnnotations());

		return method.invoke(target, args);
	}
}
